import axios from "@/utils/axios";

export default {
    // 获取框架及测评点信息
    getFrameworkMeasures: (frameworkId) => {
        return axios({
            url: "/portfolios/getFrameworkMeasures",
            method: "get",
            params: {
                frameworkId: frameworkId,
            },
        });
    },
    // 获取框架评分模板
    getFrameworkScoreTemplate: (frameworkId) => {
        return axios({
            url: "/portfolios/getFrameworkScoreTemplate",
            method: "get",
            params: {
                frameworkId: frameworkId,
            },
        });
    },
    // 为测评点评分
    scoresMeasure: (scoreList) => {
        return axios({
            url: "/portfolios/scoresMeasure",
            method: "post",
            data:  scoreList,
        });
    },
    // 获取指定取周期内孩子的评分
    getChildScore: (childId, periodAlias, frameworkId) => {
        return axios({
            url: "/portfolios/childScore",
            method: "get",
            params: {
                childId: childId,
                periodAlias: periodAlias,
                frameworkId: frameworkId,
            },
        });
    },
    // 获取指定时间段内孩子的 测评点 及其下面的 noteIds
    getMeasureNotesByChildId: (childId, startTime, endTime) => {
        return axios({
            url: "/portfolios/getMeasureNotesByChildId",
            method: "get",
            params: {
                childId: childId,
                startDate: startTime,
                endDate: endTime,
            },
        });
    },
    // Child Report - Domains
    getChildDomainsReport: (childId, periodAlias, frameworkId) => {
        return axios({
            url: "/portfolios/child/domains?" + "childId=" + childId + "&periodAlias=" + periodAlias + "&frameworkId=" + frameworkId,
            method: "post"
        });
    },
}